<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        height: 100px;
        width: 300px;
        text-align: center;
      }
      .box1 {
        height: 50px;
        width: 100%;
      }
      .box2 {
        height: 20px;
        width: 100%;
        background-color: greenyellow;
        margin-bottom: 5px;
        border-radius: 15px;
      }
      .box3 {
        height: 20px;
        width: 150px;
        background-color: black;
        border-radius: 15px;
        transition: all 1s;
      }
    </style>
  </head>
  <body>
    <div class="box" id="app">
      <div class="box1">
        <div class="box2">
          <div class="box3" :style="{width:percent+'%'}"></div>
        </div>
        <span> {{percent}}% </span>
      </div>
      <button @click="percent=25">25%</button>
      <button @click="percent=50">50%</button>
      <button @click="percent=75">75%</button>
      <button @click="percent=100">100%</button>
    </div>
    <script src="../vue.js"></script>
    <script>
      const app = new Vue({
        el: "#app",
        data: {
          percent: 50,
        },
      });
    </script>
  </body>
</html>
